
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Basic Node Transitions</title>

<style type="text/css">
/*margin and padding on body element
  can introduce errors in determining
  element position and are not recommended;
  we turn them off as a foundation for YUI
  CSS treatments. */
body {
	margin:0;
	padding:0;
}
</style>

<link type="text/css" rel="stylesheet" href="../../build/cssfonts/fonts-min.css" />
<script type="text/javascript" src="../../build/yui/yui-min.js"></script>


<!--begin custom header content for this example-->
<link href="assets//transition.css" rel="stylesheet" type="text/css">

<!--end custom header content for this example-->

</head>

<body class="yui3-skin-sam  yui-skin-sam">

<h1>Basic Node Transitions</h1>

<div class="exampleIntro">
	<p>The <code>transition</code> method animates the value of each property from the current value to the given value.
Click the X to run the animation.</p>
			
</div>

<!--BEGIN SOURCE CODE FOR EXAMPLE =============================== -->

<div id="demo">
    <a href="#">x</a>
</div>
<script type="text/javascript">
YUI({ filter: 'raw' }).use("transition", function(Y) {
    var node = Y.one('#demo');

    node.one('a').on('click', function(e) {
        e.preventDefault();
        
        node.transition({
            duration: 1, // seconds
            easing: 'ease-out',
            height: 0,
            width: 0,
            left: '150px',
            top: '100px',
            opacity: 0
        }, function() {
            this.remove(); 
        });
    });
});

</script>
</body>
</html>

<!--END SOURCE CODE FOR EXAMPLE =============================== -->

</body>
</html>
